A PMSM controls the motor current based on the magnetic pole position of its rotor, so that it has a magnetic pole position detector for magnetic pole position detection. When a magnetic pole position detector is initially attached to the motor shaft while the motor is still in the process of being manufactured, the positional relationship between the magnetic pole position of the rotor and the magnetic pole position detector is not known. Hence, it is necessary to determine positional relationship between the rotor magnetic pole position and the magnetic pole position detector. In Japanese Patent Laid-Open No. H09 (1997)-219989, a method of such magnetic pole position determination using an encoder as a magnetic pole position detector is disclosed.
When a motor and an encoder is initially combined, only the absolute zero position of the encoder itself is established. In this state, a positive current is applied to the well-known V-phase and W-phase windings (not shown) of the motor and a negative current is applied to the well-known U-phase winding of the motor causing a DC current to flow through the motor and the motor to stop at a stable point. At this time, positional error δ between the absolute zero position of the encoder and the stable stopping point of the motor is read and is written to a memory. Subsequently, the motor is operated based on the magnetic pole position while the positional error δ is corrected using an encoder count value.